package com.szh.spring.test;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * @Description:
 * @title: LagouBean
 * @Author szh
 * @Date: 2021/12/27 22:02
 * @Version 1.0
 */
public class LagouBean implements InitializingBean, ApplicationContextAware {

//	private ItBean itBean;
//
//	public void setItBean(ItBean itBean) {
//		this.itBean = itBean;
//	}

	/**
	 * 构造函数
	 */
	public LagouBean(){
		System.out.println("LagouBean 构造器...");
	}


	/**
	 * InitializingBean 接口实现
	 */
	public void afterPropertiesSet() throws Exception {
		System.out.println("LagouBean afterPropertiesSet...");
	}

	public void print() {
		System.out.println("print方法业务逻辑执行");
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		System.out.println("setApplicationContext....");
	}
}
